12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121 |
- "use strict";
- (() => {
- var exports = {};
- exports.id = 93516;
- exports.ids = [93516,64820,8668,29807];
- exports.modules = {
- /***/ 63045:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
- /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
- /* harmony export */ "getStaticPaths": () => (/* binding */ getStaticPaths),
- /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
- /* harmony export */ });
- /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71853);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6022);
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var _utils_getPageVersesParams__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(53819);
- /* harmony import */ var _utils_getQuranReaderData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50938);
- /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(92684);
- /* harmony import */ var _components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25869);
- /* harmony import */ var _components_QuranReader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14116);
- /* harmony import */ var _components_QuranReader_hooks_useFetchPagesLookup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(24881);
- /* harmony import */ var _components_QuranReader_hooks_useFetchPageVerses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(39415);
- /* harmony import */ var _dls_Spinner_Spinner__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7190);
- /* harmony import */ var _hooks_useGetMushaf__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(23830);
- /* harmony import */ var _pages_error__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(36049);
- /* harmony import */ var _redux_defaultSettings_util__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(17241);
- /* harmony import */ var _redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(62093);
- /* harmony import */ var _utils_api__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(4917);
- /* harmony import */ var _utils_chapter__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(95892);
- /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(24709);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57933);
- /* harmony import */ var _utils_page__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(94007);
- /* harmony import */ var _utils_seo__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(21823);
- /* harmony import */ var _utils_staticPageGeneration__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(45137);
- /* harmony import */ var _utils_validator__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(41051);
- /* harmony import */ var types_QuranReader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(50467);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_QuranReader__WEBPACK_IMPORTED_MODULE_10__, _components_QuranReader_hooks_useFetchPagesLookup__WEBPACK_IMPORTED_MODULE_11__, _components_QuranReader_hooks_useFetchPageVerses__WEBPACK_IMPORTED_MODULE_12__, _pages_error__WEBPACK_IMPORTED_MODULE_15__, _utils_navigation__WEBPACK_IMPORTED_MODULE_21__]);
- ([_components_QuranReader__WEBPACK_IMPORTED_MODULE_10__, _components_QuranReader_hooks_useFetchPagesLookup__WEBPACK_IMPORTED_MODULE_11__, _components_QuranReader_hooks_useFetchPageVerses__WEBPACK_IMPORTED_MODULE_12__, _pages_error__WEBPACK_IMPORTED_MODULE_15__, _utils_navigation__WEBPACK_IMPORTED_MODULE_21__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const QuranicPage = ({ hasError , pageVerses: initialData })=>{
- const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default()("common");
- const { query: { pageId } , } = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)();
- const mushafId = (0,_hooks_useGetMushaf__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z)();
- const { data: pageVersesData , isLoading: isPageVersesLoading , error: pageVersesError , } = (0,_components_QuranReader_hooks_useFetchPageVerses__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z)(String(pageId), initialData);
- const isUsingDefaultFont = (0,react_redux__WEBPACK_IMPORTED_MODULE_5__.useSelector)(_redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_17__/* .selectIsUsingDefaultFont */ .i9);
- const quranReaderStyles = (0,react_redux__WEBPACK_IMPORTED_MODULE_5__.useSelector)(_redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_17__/* .selectQuranReaderStyles */ .Pt, react_redux__WEBPACK_IMPORTED_MODULE_5__.shallowEqual);
- const { data: pagesLookupData , isLoading: isPagesLookupLoading , hasError: pagesLookupError , } = (0,_components_QuranReader_hooks_useFetchPagesLookup__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(String(pageId), types_QuranReader__WEBPACK_IMPORTED_MODULE_25__/* .QuranReaderDataType.Page */ .Qi.Page, initialData, quranReaderStyles, isUsingDefaultFont);
- if (hasError || pageId > _utils_page__WEBPACK_IMPORTED_MODULE_22__/* .PAGES_MUSHAF_MAP */ .Uh[Number(mushafId)] || pagesLookupError || pageVersesError) {
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_pages_error__WEBPACK_IMPORTED_MODULE_15__["default"], {
- statusCode: 500
- });
- }
- if (isPageVersesLoading || isPagesLookupLoading) {
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Spinner_Spinner__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {});
- }
- const path = (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_21__/* .getPageNavigationUrl */ .GK)(Number(pageId));
- const data = (0,_utils_getQuranReaderData__WEBPACK_IMPORTED_MODULE_7__["default"])(pagesLookupData, pageVersesData);
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
- title: `${t("page")} ${(0,_utils_locale__WEBPACK_IMPORTED_MODULE_20__/* .toLocalizedNumber */ .rQ)(Number(pageId), lang)}`,
- description: (0,_utils_seo__WEBPACK_IMPORTED_MODULE_23__/* .getPageOrJuzMetaDescription */ .ig)(data),
- canonical: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_21__/* .getCanonicalUrl */ .Z2)(lang, path),
- languageAlternates: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_20__/* .getLanguageAlternates */ .qc)(path)
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_QuranReader__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
- initialData: data,
- id: String(pageId),
- quranReaderDataType: types_QuranReader__WEBPACK_IMPORTED_MODULE_25__/* .QuranReaderDataType.Page */ .Qi.Page
- })
- ]
- });
- };
- // eslint-disable-next-line react-func/max-lines-per-function
- const getStaticProps$1 = async ({ params , locale })=>{
- const pageIdNumber = Number(params.pageId);
- const defaultMushafId = (0,_utils_api__WEBPACK_IMPORTED_MODULE_18__/* .getMushafId */ .$P)((0,_redux_defaultSettings_util__WEBPACK_IMPORTED_MODULE_16__/* .getQuranReaderStylesInitialState */ .kq)(locale).quranFont, (0,_redux_defaultSettings_util__WEBPACK_IMPORTED_MODULE_16__/* .getQuranReaderStylesInitialState */ .kq)(locale).mushafLines).mushaf;
- const LONGEST_MUSHAF_ID = types_QuranReader__WEBPACK_IMPORTED_MODULE_25__/* .Mushaf.Indopak15Lines */ .RA.Indopak15Lines;
- // we need to validate the pageId first to save calling BE since we haven't set the valid paths inside getStaticPaths to avoid pre-rendering them at build time.
- if (!(0,_utils_validator__WEBPACK_IMPORTED_MODULE_24__/* .isValidPageNumber */ .vU)(pageIdNumber, LONGEST_MUSHAF_ID)) {
- return {
- notFound: true
- };
- }
- // The defaultMushafId is 2 representing the Madinah Mushaf
- // PAGES_MUSHAF_MAP will return the mushaf total number of pages when passed a mushafId
- // Mushaf ID: 2 (Madinah) -> Pages Count: 604 pages
- const defaultMushafPagesCount = _utils_page__WEBPACK_IMPORTED_MODULE_22__/* .PAGES_MUSHAF_MAP */ .Uh[defaultMushafId];
- // In case the requested page/[pageId] is greater than the SSR loaded default mushaf total pages count
- // we set the pageId to the last available page, otherwise we load the passed pageID
- const pageId = pageIdNumber > defaultMushafPagesCount ? String(defaultMushafPagesCount) : String(params.pageId);
- try {
- const pageVersesResponse = await (0,_api__WEBPACK_IMPORTED_MODULE_8__/* .getPageVerses */ .iw)(pageId, locale, (0,_utils_getPageVersesParams__WEBPACK_IMPORTED_MODULE_6__["default"])(defaultMushafId, (0,_utils_api__WEBPACK_IMPORTED_MODULE_18__/* .getDefaultWordFields */ .hD)((0,_redux_defaultSettings_util__WEBPACK_IMPORTED_MODULE_16__/* .getQuranReaderStylesInitialState */ .kq)(locale).quranFont)));
- const pagesLookupResponse = await (0,_api__WEBPACK_IMPORTED_MODULE_8__/* .getPagesLookup */ .IP)({
- pageNumber: Number(pageId),
- mushaf: defaultMushafId
- });
- const chaptersData = await (0,_utils_chapter__WEBPACK_IMPORTED_MODULE_19__/* .getAllChaptersData */ .T4)(locale);
- return {
- props: {
- chaptersData,
- pageVerses: (0,_utils_getQuranReaderData__WEBPACK_IMPORTED_MODULE_7__["default"])(pagesLookupResponse, pageVersesResponse)
- },
- revalidate: _utils_staticPageGeneration__WEBPACK_IMPORTED_MODULE_26__/* .ONE_WEEK_REVALIDATION_PERIOD_SECONDS */ .Dp
- };
- } catch (error) {
- return {
- props: {
- hasError: true
- },
- revalidate: _utils_staticPageGeneration__WEBPACK_IMPORTED_MODULE_26__/* .REVALIDATION_PERIOD_ON_ERROR_SECONDS */ .eW
- };
- }
- };
- const getStaticPaths = async ()=>({
- paths: [],
- fallback: "blocking"
- });
- var serverComponentModule = /*#__PURE__*/Object.freeze({
- __proto__: null,
- getStaticProps: getStaticProps$1,
- getStaticPaths: getStaticPaths,
- 'default': QuranicPage
- });
- /*
- * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
- * `pages/` directory.
- *
- * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
- * this causes both TS and ESLint to complain, hence the pragma comments below.
- */
- const userPageModule = serverComponentModule ;
- const pageComponent = userPageModule ? userPageModule.default : undefined;
- const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
- const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
- const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const getInitialPropsWrappers = {
- '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
- '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
- '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
- };
- const getInitialPropsWrapper = getInitialPropsWrappers['/page/[pageId]'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
- if (pageComponent && typeof origGetInitialProps === 'function') {
- pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
- }
- const getStaticProps =
- typeof origGetStaticProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/page/[pageId]')
- : undefined;
- const getServerSideProps =
- typeof origGetServerSideProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/page/[pageId]')
- : undefined;
- const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 53819:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
- /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
- /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
- /* harmony export */ });
- /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
- const getPageVersesParams = (mushafId, wordFields)=>{
- return {
- perPage: "all",
- mushaf: mushafId,
- filterPageWords: true,
- ...wordFields
- };
- };
- var serverComponentModule = /*#__PURE__*/Object.freeze({
- __proto__: null,
- 'default': getPageVersesParams
- });
- /*
- * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
- * `pages/` directory.
- *
- * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
- * this causes both TS and ESLint to complain, hence the pragma comments below.
- */
- const userPageModule = serverComponentModule ;
- const pageComponent = userPageModule ? userPageModule.default : undefined;
- const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
- const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
- const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const getInitialPropsWrappers = {
- '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
- '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
- '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
- };
- const getInitialPropsWrapper = getInitialPropsWrappers['/page/utils/getPageVersesParams'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
- if (pageComponent && typeof origGetInitialProps === 'function') {
- pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
- }
- const getStaticProps =
- typeof origGetStaticProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/page/utils/getPageVersesParams')
- : undefined;
- const getServerSideProps =
- typeof origGetServerSideProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/page/utils/getPageVersesParams')
- : undefined;
- const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
- /***/ }),
- /***/ 50938:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
- /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
- /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
- /* harmony export */ });
- /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
- const getQuranReaderData = (pagesLookupData, pageVersesData)=>{
- return {
- ...pageVersesData,
- pagesLookup: pagesLookupData,
- metaData: {
- numberOfVerses: pageVersesData.verses.length
- }
- };
- };
- var serverComponentModule = /*#__PURE__*/Object.freeze({
- __proto__: null,
- 'default': getQuranReaderData
- });
- /*
- * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
- * `pages/` directory.
- *
- * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
- * this causes both TS and ESLint to complain, hence the pragma comments below.
- */
- const userPageModule = serverComponentModule ;
- const pageComponent = userPageModule ? userPageModule.default : undefined;
- const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
- const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
- const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const getInitialPropsWrappers = {
- '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
- '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
- '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
- };
- const getInitialPropsWrapper = getInitialPropsWrappers['/page/utils/getQuranReaderData'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
- if (pageComponent && typeof origGetInitialProps === 'function') {
- pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
- }
- const getStaticProps =
- typeof origGetStaticProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/page/utils/getQuranReaderData')
- : undefined;
- const getServerSideProps =
- typeof origGetServerSideProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/page/utils/getQuranReaderData')
- : undefined;
- const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
- /***/ }),
- /***/ 39415:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6022);
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var swr_immutable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(79847);
- /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92684);
- /* harmony import */ var _hooks_useGetMushaf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23830);
- /* harmony import */ var _pages_page_utils_getPageVersesParams__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53819);
- /* harmony import */ var _redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62093);
- /* harmony import */ var _utils_api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4917);
- /* harmony import */ var _utils_apiPaths__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46127);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([swr_immutable__WEBPACK_IMPORTED_MODULE_2__]);
- swr_immutable__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
- /**
- * This hooks fetches the page's verses data by the pageId
- *
- * @param {string} pageId
- * @param {VersesResponse} initialData
- *
- * @returns {{ pageVersesResponse: VersesResponse; isLoading: boolean; error: any }}
- */ const useFetchPageVerses = (pageId, initialData)=>{
- const { lang: locale } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_0___default()();
- const quranFont = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(_redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_6__/* .selectQuranFont */ .Ho, react_redux__WEBPACK_IMPORTED_MODULE_1__.shallowEqual);
- const isUsingDefaultFont = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(_redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_6__/* .selectIsUsingDefaultFont */ .i9);
- const mushafId = (0,_hooks_useGetMushaf__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)();
- const params = (0,_pages_page_utils_getPageVersesParams__WEBPACK_IMPORTED_MODULE_5__["default"])(mushafId, (0,_utils_api__WEBPACK_IMPORTED_MODULE_7__/* .getDefaultWordFields */ .hD)(quranFont));
- const { data , isValidating , error } = (0,swr_immutable__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_utils_apiPaths__WEBPACK_IMPORTED_MODULE_8__/* .makePageVersesUrl */ .K2)(pageId, locale, params), async ()=>(0,_api__WEBPACK_IMPORTED_MODULE_3__/* .getPageVerses */ .iw)(pageId, locale, params), {
- fallbackData: initialData,
- revalidateOnMount: !isUsingDefaultFont
- });
- return {
- isLoading: isValidating,
- data,
- error
- };
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useFetchPageVerses);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 23830:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6022);
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var _redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62093);
- /* harmony import */ var _utils_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4917);
- /**
- * Instead of repeating using multiple selectors to get the MushafId
- * in multiple components, we are introducing this hook to keep it DRY.
- *
- * TODO: apply it to everywhere using the mushafId
- *
- * @returns {Mushaf}
- */ const useGetMushaf = ()=>{
- const quranFont = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.useSelector)(_redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_1__/* .selectQuranFont */ .Ho, react_redux__WEBPACK_IMPORTED_MODULE_0__.shallowEqual);
- const mushafLines = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.useSelector)(_redux_slices_QuranReader_styles__WEBPACK_IMPORTED_MODULE_1__/* .selectQuranMushafLines */ .z$, react_redux__WEBPACK_IMPORTED_MODULE_0__.shallowEqual);
- const { mushaf } = (0,_utils_api__WEBPACK_IMPORTED_MODULE_2__/* .getMushafId */ .$P)(quranFont, mushafLines);
- return mushaf;
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useGetMushaf);
- /***/ }),
- /***/ 21823:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "WQ": () => (/* binding */ createSEOConfig),
- /* harmony export */ "ig": () => (/* binding */ getPageOrJuzMetaDescription)
- /* harmony export */ });
- /* unused harmony export config */
- /* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24709);
- /* harmony import */ var _lib_og__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11670);
- /* eslint-disable react-func/max-lines-per-function */
- const config = {
- siteName: "Quran.com",
- twitterHandle: "@app_quran",
- twitterCardType: "summary_large_image",
- facebookApp: "342185219529773",
- facebookPage: "603289706669016",
- appleAppName: "Quran - by Quran.com - قرآن",
- appleAppId: "1118663303",
- appleAppUrl: "https://apps.apple.com/us/app/quran-by-quran-com-qran/id1118663303",
- androidAppName: "Quran for Android",
- androidPackage: "com.quran.labs.androidquran",
- androidAppUrl: "https://play.google.com/store/apps/details?id=com.quran.labs.androidquran"
- };
- const isProduction = process.env.NEXT_PUBLIC_VERCEL_ENV === "production";
- function createSEOConfig({ title , description , canonicalUrl , locale } = {}) {
- const seoTitle = title || "";
- return {
- title: seoTitle,
- description,
- titleTemplate: "%s - Quran.com",
- defaultTitle: config.siteName,
- dangerouslySetAllPagesToNoFollow: !isProduction,
- dangerouslySetAllPagesToNoIndex: !isProduction,
- canonical: canonicalUrl,
- openGraph: {
- type: "website",
- locale: (0,_locale__WEBPACK_IMPORTED_MODULE_0__/* .getOpenGraphLocale */ .A3)(locale),
- url: canonicalUrl,
- title: seoTitle,
- description,
- images: [
- {
- url: (0,_lib_og__WEBPACK_IMPORTED_MODULE_1__/* .getDefaultOgImageUrl */ .qW)({
- locale
- }),
- width: 1200,
- height: 630,
- alt: config.siteName
- },
- ],
- // eslint-disable-next-line @typescript-eslint/naming-convention
- site_name: config.siteName
- },
- facebook: {
- appId: config.facebookApp
- },
- twitter: {
- handle: config.twitterHandle,
- site: config.twitterHandle,
- cardType: config.twitterCardType
- },
- additionalMetaTags: [
- {
- property: "fb:pages",
- content: config.facebookPage
- },
- // {
- // name: 'al:ios:url',
- // content: config.appleAppUrl,
- // },
- // {
- // name: 'al:ios:app_name',
- // content: config.appleAppName,
- // },
- // {
- // name: 'al:ios:app_store_id',
- // content: config.appleAppId,
- // },
- // {
- // name: 'al:android:url',
- // content: config.androidAppUrl,
- // },
- // {
- // name: 'al:android:app_name',
- // content: config.androidAppName,
- // },
- // {
- // name: 'al:android:package',
- // content: config.androidPackage,
- // },
- // {
- // name: 'apple-itunes-app',
- // content: `app-id=${config.appleAppId}`,
- // },
- {
- name: "Charset",
- content: "UTF-8"
- },
- {
- name: "Distribution",
- content: "Global"
- },
- {
- name: "Rating",
- content: "General"
- },
- {
- name: "theme-color",
- content: "#fff"
- },
- {
- name: "viewport",
- content: "width=device-width, initial-scale=1, shrink-to-fit=no"
- },
- ]
- };
- }
- /**
- * Concatenate the first 4 verses of the Page/Juz.
- *
- * @param {VersesResponse} response
- * @returns {string}
- */ const getPageOrJuzMetaDescription = (response)=>{
- return response.verses.slice(0, 4).map((verse)=>verse.textImlaeiSimple).join(" - ");
- };
- /***/ }),
- /***/ 75184:
- /***/ ((module) => {
- module.exports = require("@reduxjs/toolkit");
- /***/ }),
- /***/ 58097:
- /***/ ((module) => {
- module.exports = require("@sentry/nextjs");
- /***/ }),
- /***/ 59456:
- /***/ ((module) => {
- module.exports = require("@xstate/react");
- /***/ }),
- /***/ 59003:
- /***/ ((module) => {
- module.exports = require("classnames");
- /***/ }),
- /***/ 34741:
- /***/ ((module) => {
- module.exports = require("clipboard-copy");
- /***/ }),
- /***/ 62733:
- /***/ ((module) => {
- module.exports = require("fuse.js");
- /***/ }),
- /***/ 59606:
- /***/ ((module) => {
- module.exports = require("humps");
- /***/ }),
- /***/ 59969:
- /***/ ((module) => {
- module.exports = require("lodash/capitalize");
- /***/ }),
- /***/ 93908:
- /***/ ((module) => {
- module.exports = require("lodash/debounce");
- /***/ }),
- /***/ 12372:
- /***/ ((module) => {
- module.exports = require("lodash/findKey");
- /***/ }),
- /***/ 98492:
- /***/ ((module) => {
- module.exports = require("lodash/groupBy");
- /***/ }),
- /***/ 35599:
- /***/ ((module) => {
- module.exports = require("lodash/isArray");
- /***/ }),
- /***/ 35526:
- /***/ ((module) => {
- module.exports = require("lodash/random");
- /***/ }),
- /***/ 64042:
- /***/ ((module) => {
- module.exports = require("lodash/range");
- /***/ }),
- /***/ 47657:
- /***/ ((module) => {
- module.exports = require("lodash/sample");
- /***/ }),
- /***/ 18459:
- /***/ ((module) => {
- module.exports = require("lodash/uniq");
- /***/ }),
- /***/ 16641:
- /***/ ((module) => {
- module.exports = require("next-seo");
- /***/ }),
- /***/ 74137:
- /***/ ((module) => {
- module.exports = require("next-translate/Trans");
- /***/ }),
- /***/ 60866:
- /***/ ((module) => {
- module.exports = require("next-translate/useTranslation");
- /***/ }),
- /***/ 3280:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/app-router-context.js");
- /***/ }),
- /***/ 92796:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/head-manager-context.js");
- /***/ }),
- /***/ 3539:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
- /***/ }),
- /***/ 34014:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
- /***/ }),
- /***/ 78524:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/is-plain-object.js");
- /***/ }),
- /***/ 95832:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/loadable.js");
- /***/ }),
- /***/ 78020:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/mitt.js");
- /***/ }),
- /***/ 64406:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
- /***/ }),
- /***/ 24964:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router-context.js");
- /***/ }),
- /***/ 93431:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
- /***/ }),
- /***/ 11751:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
- /***/ }),
- /***/ 46220:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
- /***/ }),
- /***/ 10299:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
- /***/ }),
- /***/ 23938:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
- /***/ }),
- /***/ 29565:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
- /***/ }),
- /***/ 35789:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
- /***/ }),
- /***/ 1897:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
- /***/ }),
- /***/ 1428:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
- /***/ }),
- /***/ 28854:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
- /***/ }),
- /***/ 91292:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
- /***/ }),
- /***/ 34567:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
- /***/ }),
- /***/ 80979:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
- /***/ }),
- /***/ 93297:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
- /***/ }),
- /***/ 36052:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
- /***/ }),
- /***/ 84226:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
- /***/ }),
- /***/ 95052:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
- /***/ }),
- /***/ 59232:
- /***/ ((module) => {
- module.exports = require("next/dist/shared/lib/utils.js");
- /***/ }),
- /***/ 40968:
- /***/ ((module) => {
- module.exports = require("next/head");
- /***/ }),
- /***/ 71853:
- /***/ ((module) => {
- module.exports = require("next/router");
- /***/ }),
- /***/ 16689:
- /***/ ((module) => {
- module.exports = require("react");
- /***/ }),
- /***/ 2784:
- /***/ ((module) => {
- module.exports = require("react-hotkeys-hook");
- /***/ }),
- /***/ 6022:
- /***/ ((module) => {
- module.exports = require("react-redux");
- /***/ }),
- /***/ 78404:
- /***/ ((module) => {
- module.exports = require("react-virtuoso");
- /***/ }),
- /***/ 20997:
- /***/ ((module) => {
- module.exports = require("react/jsx-runtime");
- /***/ }),
- /***/ 14161:
- /***/ ((module) => {
- module.exports = require("redux-persist");
- /***/ }),
- /***/ 52648:
- /***/ ((module) => {
- module.exports = require("refresh-fetch");
- /***/ }),
- /***/ 82522:
- /***/ ((module) => {
- module.exports = require("xstate");
- /***/ }),
- /***/ 44549:
- /***/ ((module) => {
- module.exports = require("xstate/lib/actions");
- /***/ }),
- /***/ 11601:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-checkbox");;
- /***/ }),
- /***/ 74973:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-collapsible");;
- /***/ }),
- /***/ 77715:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-dialog");;
- /***/ }),
- /***/ 31481:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-dropdown-menu");;
- /***/ }),
- /***/ 98680:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-popover");;
- /***/ }),
- /***/ 4086:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-radio-group");;
- /***/ }),
- /***/ 72994:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-separator");;
- /***/ }),
- /***/ 66704:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-tooltip");;
- /***/ }),
- /***/ 28560:
- /***/ ((module) => {
- module.exports = import("@radix-ui/react-visually-hidden");;
- /***/ }),
- /***/ 88813:
- /***/ ((module) => {
- module.exports = import("firebase/compat/analytics");;
- /***/ }),
- /***/ 33773:
- /***/ ((module) => {
- module.exports = import("firebase/compat/app");;
- /***/ }),
- /***/ 69915:
- /***/ ((module) => {
- module.exports = import("js-cookie");;
- /***/ }),
- /***/ 45641:
- /***/ ((module) => {
- module.exports = import("react-hook-form");;
- /***/ }),
- /***/ 35517:
- /***/ ((module) => {
- module.exports = import("react-joyride");;
- /***/ }),
- /***/ 3590:
- /***/ ((module) => {
- module.exports = import("react-toastify");;
- /***/ }),
- /***/ 15941:
- /***/ ((module) => {
- module.exports = import("swr");;
- /***/ }),
- /***/ 79847:
- /***/ ((module) => {
- module.exports = import("swr/immutable");;
- /***/ }),
- /***/ 63477:
- /***/ ((module) => {
- module.exports = require("querystring");
- /***/ })
- };
- ;
- // load runtime
- var __webpack_require__ = require("../../webpack-runtime.js");
- __webpack_require__.C(exports);
- var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
- var __webpack_exports__ = __webpack_require__.X(0, [11497,79165,96954,96270,24709,57933,61239,25869,50497,76410,79717,13830,37883,22197,12951,36049,85949,62093,91308,41051,99163,5639,42752,46570,64564,57072,37013,67972,6094,17543,66151,39508], () => (__webpack_exec__(63045)));
- module.exports = __webpack_exports__;
- })();
- //# sourceMappingURL=[pageId].js.map
|